﻿using System.Collections.Generic;

namespace Ganss.Excel.Tests.Data
{
    class ProductDynamicValueConvertSave : ProductDynamic
    {
        public override bool Equals(object obj)
        {
            return obj is ProductDynamicValueConvertSave save &&
                   Name == save.Name &&
                   Number == save.Number &&
                   Price == save.Price &&
                   Offer == save.Offer &&
                   OfferEnd == save.OfferEnd &&
                   Value == save.Value;
        }

        public override int GetHashCode()
        {
            int hashCode = 1336918815;
            hashCode = hashCode * -1521134295 + base.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Name);
            hashCode = hashCode * -1521134295 + Number.GetHashCode();
            hashCode = hashCode * -1521134295 + Price.GetHashCode();
            hashCode = hashCode * -1521134295 + Offer.GetHashCode();
            hashCode = hashCode * -1521134295 + OfferEnd.GetHashCode();
            hashCode = hashCode * -1521134295 + Value.GetHashCode();
            return hashCode;
        }
    }
}